<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>绑定</title>
    <link href="css/mui.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="css/aui.css"/>
    <link rel="stylesheet" href="css/shop.css">
    <link rel="stylesheet" href="css/alert.css">
    <script src="js/jquery-1.8.2.min.js"></script>
    <script src="js/mui.min.js"></script>
    <script>
        function autoload(){
            var senddata={};
            senddata.user_id=user_id;
            senddata.userpwd=userpwd;
            $.ajax({
                type: "POST",
                //url: "http://test/jsonp.php",
                data: senddata,
                url: "http://xjh.taoleyizhan.com/wap/index.php?ctl=user&act=setData",
                dataType: "json",
                success:function (json) {
                    console.log(json);
                    page_data=json;

                    if(page_data.list[0].alipayacount==0){

                        $(".zhifubao").removeAttr("disabled")
                    }else{
                        $(".zhifubao").val(page_data.list[0].alipayacount);
                        $(".zhifubao").attr("disabled")
                    }

                    $(".btn").on("click",function () {
                        var senddata={};
                        senddata.user_id=user_id;
                        senddata.userpwd=userpwd;
                        senddata.zhifubao=$(".zhifubao").val();
                        $.ajax({
                            type: "POST",
                            //url: "http://test/jsonp.php",
                            data: senddata,
                            url: "http://xjh.taoleyizhan.com/wap/index.php?ctl=user&act=zhifubao",
                            dataType: "json",
                            success:function (json) {
                                console.log(json)
                                if(json.a==1){
                                    alert("已绑定")
                                }else{
                                    alert("绑定成功")
                                }

                            }
                        })
                    })
                }
            })
        }


        // var autoload=function (){};

    </script>
    <script src="js/init.js"></script>
</head>
<body style="background:#fff;">
    <header class="mui-bar mui-bar-nav">
        <a href="javascript:history.go(-1)" class="mui-icon-undo mui-icon mui-icon-left-nav mui-pull-left"></a>
        <h1 class="mui-title" id="page_title">绑定支付宝</h1>

    </header>

    <div class="mui-content mui-text-center aui-pad-10" style="height:100vh;padding-top:10vh;">
        <input class="zhifubao f14 mui-text-center" style="border:none;" disabled="true" type="text" placeholder="请输入支付宝账号">
        <button class="btn aui-mar-10">立即绑定</button>
    </div>

</body>
</html>